package com.example.demo.test;

import org.apache.commons.lang3.StringUtils;

public class test {
    public static void main(String[] args) {
        String s = "永嘉036";
        String groupName = s;
        String manageUserId = null;
        String costomUserId = null;
        if (s.contains("#")) {
            if (s.indexOf("#", -1) != s.lastIndexOf("#")) {
                System.out.println(true);
            }
        }

        if(s.contains("#")){
            String[] arr = s.split("#");
            if(arr.length >= 1){
                groupName = arr[0];
            }
            if(arr.length >= 2){
                manageUserId = arr[1];
            }
            if(arr.length == 3){
                costomUserId = arr[2];
            }
        }
        System.out.println(groupName);
        System.out.println(manageUserId);
        System.out.println(costomUserId);
        if(StringUtils.isBlank(costomUserId)){
            System.out.println(true);
        }
    }
}
